﻿@model OplDataEntry.Models.Fixture

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Fixture</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.TeamID1, "First Team")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TeamID1", String.Empty)
            @Html.ValidationMessageFor(model => model.TeamID1)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TeamID2, "Second Team")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TeamID2", String.Empty)
            @Html.ValidationMessageFor(model => model.TeamID2)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TeamWon, "Won Team")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TeamWon", String.Empty)
            @Html.ValidationMessageFor(model => model.TeamWon)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Date)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Date)
            @Html.ValidationMessageFor(model => model.Date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SeasonId, "Season")
        </div>
        <div class="editor-field">
            @Html.DropDownList("SeasonId", String.Empty)
            @Html.ValidationMessageFor(model => model.SeasonId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ManOfTheMatch, "Man Of the match")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ManOfTheMatch", String.Empty)
            @Html.ValidationMessageFor(model => model.ManOfTheMatch)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstBattingTeam, "First Batting Team")
        </div>
        <div class="editor-field">
            @Html.DropDownList("FirstBattingTeam", String.Empty)
            @Html.ValidationMessageFor(model => model.FirstBattingTeam)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SecondBattingTeam, "Second Batting Team")
        </div>
        <div class="editor-field">
            @Html.DropDownList("SecondBattingTeam", String.Empty)
            @Html.ValidationMessageFor(model => model.SecondBattingTeam)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ResultDescription)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ResultDescription)
            @Html.ValidationMessageFor(model => model.ResultDescription)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Team1Score)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Team1Score)
            @Html.ValidationMessageFor(model => model.Team1Score)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Team2Score)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Team2Score)
            @Html.ValidationMessageFor(model => model.Team2Score)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Team1Wickets)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Team1Wickets)
            @Html.ValidationMessageFor(model => model.Team1Wickets)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Team2Wickets)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Team2Wickets)
            @Html.ValidationMessageFor(model => model.Team2Wickets)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
